package com.netease.spring.ch3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.netease.spring.ch2.Performer;
import com.netease.spring.exceptions.PerformanceException;

public class Main {

    /**
     * @param args
     * @throws PerformanceException
     */
    public static void main(String[] args) throws PerformanceException {
        ApplicationContext applicationContext = new FileSystemXmlApplicationContext(
                "ch3_magic_assistant.xml");
        Performer magician = (Performer) applicationContext.getBean("harry2");
        magician.perform();

        Performer list = (Performer) applicationContext.getBean("stevie");
        list.perform();
    }

}
